<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>后台管理 -- Talking</title>
<link rel="stylesheet" href="./static/css/frame.css" />
<script src="./static/js/jquery-1.3.min.js"></script>
<script>
$(document).ready(function(){
    $('#addLink').click(function(){
        $('.list tr:last').before("<tr>"+
           "<td></td>"+
           "<td><input type='text' name='orderNo[ ]' style='width:30px;' value = '0' /></td>"+
           "<td><input type='text' name='name[ ]' style='width:300px;' /></td>"+
           "<td></td>"+
           "</tr>");
        if($('body').height()>=500){
            top.resizeFrame();
        }
    });
    $('#chkDel').click(function(){
        if($(this).attr('checked')==true){
            $('input[type=checkbox]').each(function(i){
                $(this).attr('checked','checked');
            });
        }
        else{
            $('input[type=checkbox]').each(function(i){
                $(this).removeAttr('checked');
            });
        }
    });
});
</script>
</head>

<body>
<div id="content">
    <div class="title">贴吧 » 分类管理</div>
    <div class="main">
        <h3>分类管理</h3>
        <form action="cate.php" name="form" method="post">
        <table cellpadding="0" cellspacing="0" class="list">
            <tbody>  
                <tr> 
                    <td width="30" align="center">删除</td>  
                    <td width="50">排序</td>   
                    <td>分类名称</td>    
                    <td width="90" align="center">贴吧数</td> 
                    <td width="90" align="center">操作者</td>
                </tr>
                {{section name=n loop=$cates}}
                <tr> 
                    <td align="center">
                        <input type="checkbox" name="del[ ]" value="{{$cates[n].CateID}}" />
                    </td>
                    <td>{{$cates[n].CateOrderNo}}</td>
                    <td>{{$cates[n].CateName}}</td>
                    <td align="center">{{$cates[n].CateBarNum}}</td>
                    <td align="center"><a href="/user.php?id={{$cates[n].CateManager}}" target="_blank">{{$cates[n].UserName}}</a></td>                                                                                                
                </tr>
                {{/section}}
                <tr>
                  <td align="center"><input type="checkbox" id="chkDel" /></td>
                  <td colspan="3"><a href="javascript:void(0)" id="addLink">添加分类</a></td>
                </tr>
            </tbody>
        </table>
        <p>
            <input type="submit" class="button_submit" name="submit" value="提交" /> 
            <span>{{$tip}}</span>   
        </p>
        </form>
    </div>
</div>
</body>
</html>